package com.ss.android.caijing.stepcounter;

import android.app.Activity;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.TextView;

import com.ss.android.caijing.stepcounterlib.log.AccelerateLog;
import com.ss.android.caijing.stepcounterlib.log.CodeLog;

/**
 * Created by zdh on 2017/11/10.
 */

public class LogShowActivity extends Activity{
    TextView contentView = null;
    TextView clearLogView = null;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.layout_logshow);
        contentView = (TextView) findViewById(R.id.log_content);
        contentView.setText(CodeLog.getAllLog());
        clearLogView = (TextView) findViewById(R.id.clear_log_view);
        clearLogView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                CodeLog.clearLog();
                AccelerateLog.instance().clearLog();
                contentView.setText(CodeLog.getAllLog());
            }
        });
    }
}
